package com.dudu.model;

public class Subscriber {

	//会议ID
	private String conferenceID = "";
	//用户ID，例如用户的电话号码
	private String subscriberID = "";
	//呼叫ID，唯一表示一次呼叫
	private String callID = "";
	//闭音状态
	private String isMute = "";
	//加入会议时间
	private long attendTime = 0;
	//离开会议时间
	private long leftTime = 0;
	
	/**
	 * 0：已经入会，1：入会后还在会议中
	 */
	private int state = 0;
	//是否处于被点名状态true：处于被点名状态false：不处于被点名状态
	private String isRollcalled = "";
	//是否拥有令牌状态true：拥有令牌false：没有令牌
	private String hasTokenRing = "";
	//是否正在发言。true:用户正在发言	false:用户没有发言
	private String isSpeaking = "";
	//是否静音状态	true：可以听false：不能听
	private String canListen = "";
	//创建时间
	private String create_time = "";
	

	public String getCreate_time() {
		return create_time;
	}

	public void setCreate_time(String create_time) {
		this.create_time = create_time;
	}

	public String getConferenceID() {
		return conferenceID;
	}

	public void setConferenceID(String conferenceID) {
		this.conferenceID = conferenceID;
	}

	public String getSubscriberID() {
		return subscriberID;
	}

	public void setSubscriberID(String subscriberID) {
		this.subscriberID = subscriberID;
	}

	public String getCallID() {
		return callID;
	}

	public void setCallID(String callID) {
		this.callID = callID;
	}
	
	public String getIsMute() {
		return isMute;
	}

	public void setIsMute(String isMute) {
		this.isMute = isMute;
	}

	public long getAttendTime() {
		return attendTime;
	}

	public void setAttendTime(long attendTime) {
		this.attendTime = attendTime;
	}

	public long getLeftTime() {
		return leftTime;
	}

	public void setLeftTime(long leftTime) {
		this.leftTime = leftTime;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public String getIsRollcalled() {
		return isRollcalled;
	}

	public void setIsRollcalled(String isRollcalled) {
		this.isRollcalled = isRollcalled;
	}

	public String getHasTokenRing() {
		return hasTokenRing;
	}

	public void setHasTokenRing(String hasTokenRing) {
		this.hasTokenRing = hasTokenRing;
	}

	public String getIsSpeaking() {
		return isSpeaking;
	}

	public void setIsSpeaking(String isSpeaking) {
		this.isSpeaking = isSpeaking;
	}

	public String getCanListen() {
		return canListen;
	}

	public void setCanListen(String canListen) {
		this.canListen = canListen;
	}


	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (attendTime ^ (attendTime >>> 32));
		result = prime * result + ((conferenceID == null) ? 0 : conferenceID.hashCode());
		result = prime * result + ((subscriberID == null) ? 0 : subscriberID.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Subscriber other = (Subscriber) obj;
		if (attendTime != other.attendTime)
			return false;
		if (conferenceID == null) {
			if (other.conferenceID != null)
				return false;
		} else if (!conferenceID.equals(other.conferenceID))
			return false;
		if (subscriberID == null) {
			if (other.subscriberID != null)
				return false;
		} else if (!subscriberID.equals(other.subscriberID))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Subscriber [conferenceID=" + conferenceID + ", subscriberID=" + subscriberID + ", callID=" + callID + ", isMute=" + isMute + ", attendTime=" + attendTime + ", leftTime=" + leftTime + ", state=" + state + ", isRollcalled=" + isRollcalled
				+ ", hasTokenRing=" + hasTokenRing + ", isSpeaking=" + isSpeaking + ", canListen=" + canListen + "]";
	}
	
}
